package com.lechuang.member.feign;

import com.lechuang.common.result.Result;
import com.lechuang.member.dto.SaveMemberDto;
import com.lechuang.member.vo.MemberDictCommonVo;
import com.lechuang.member.vo.MemberVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 *
 * </p>
 *
 * @author apple
 * @since 2024-6-22
 */
@FeignClient(value = "mall-member-${spring.profiles.active}")
public interface MemberFeign {

    @PostMapping("/memberManage/queryByUserId")
    Result<MemberVo> queryByUserId(@RequestBody Long id);

    @GetMapping("/memberManage/queryDefaultDict")
    Result<MemberDictCommonVo> queryDefaultDict();

    @PostMapping("/memberManage/saveMember")
    Result saveMember(@RequestBody SaveMemberDto saveMemberDto);

    @PostMapping("/memberManage/updateMemberByUserId")
    Result updateMemberByUserId(@RequestBody SaveMemberDto saveMemberDto);
}
